package yawning.mew.cat;

import yawning.mew.ProcEffect.Trigger;
import yawning.mew.sim.SimulationAction;

public class PotionAction implements SimulationAction {
	CatModelSimState mState;
	boolean mUsed;

	PotionAction(CatModelSimState state) {
		mState = state;
		mUsed = false;
	}

	@Override
	public double perform() {
		if (!mState.mHavePotion || mUsed) return SimulationAction.ACTION_FAIL;

		// TODO: Support double poting.
		mState.mSimUtil.triggerProc(Trigger.POTION);
		mUsed = true;

		return 0.0;
	}
}
